'use strict';

angular.module('xuexibangApp')
  .config(function($stateProvider, $urlRouterProvider) {
    $urlRouterProvider.when("/exam", "/exam/newest");
    $stateProvider
      .state('exam', {
        url: '/exam',
        templateUrl: 'app/exam/exam.html',
        controller: 'ExamCtrl'
      }).state("exam.newest", {
        url: "/newest?id",
        templateUrl: "app/exam/newest.html",
        controller: 'NewestCtrl'
      })
      .state("exam.history", {
        url: "/history",
        templateUrl: "app/exam/history.html",
        controller: 'HistoryCtrl'
      })
      .state("exam.manage", {
        url: "/manage?id",
        templateUrl: "app/exam/manage.html",
        controller: 'ManageCtrl'
      });
  });
